-- GENERATED SPELL FOR [Lady Sylvanas Windrunner] --


function spell0_10181(pUnit, Event) --@Black Arrow,n/a--
pUnit:FullCastSpellOnTarget(59712,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10181', 32000, 1)
end

function spell1_10181(pUnit, Event) --@Fade,Self--
pUnit:FullCastSpellOnTarget(20672,pUnit)
pUnit:RegisterEvent('Sorts_10181', 3304, 1)
end

function spell2_10181(pUnit, Event) --@Multi-Shot,n/a--
pUnit:FullCastSpellOnTarget(59713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10181', 620, 1)
end

function spell3_10181(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(59710,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10181', 579, 1)
end

function spell4_10181(pUnit, Event) --@Summon Skeleton,Self--
pUnit:FullCastSpellOnTarget(59711,pUnit)
pUnit:RegisterEvent('Sorts_10181', 541, 1)
end

function Sorts_10181(pUnit, Event)
local choix_sorts_10181 = math.random(0, 4)
if choix_sorts_10181 == 0 then
pUnit:RegisterEvent('spell0_10181', 1, 1)
end
if choix_sorts_10181 == 1 then
pUnit:RegisterEvent('spell1_10181', 1, 1)
end
if choix_sorts_10181 == 2 then
pUnit:RegisterEvent('spell2_10181', 1, 1)
end
if choix_sorts_10181 == 3 then
pUnit:RegisterEvent('spell3_10181', 1, 1)
end
if choix_sorts_10181 == 4 then
pUnit:RegisterEvent('spell4_10181', 1, 1)
end
end

function mob10181_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10181', math.random(1500, 3000), 1)
end

function mob10181_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10181_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10181_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10181, 1, 'mob10181_Action')
RegisterUnitEvent(10181, 2, 'mob10181_Leave')
RegisterUnitEvent(10181, 3, 'mob10181_Kill')
RegisterUnitEvent(10181, 4, 'mob10181_Die')
